home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 7: Sunsite / Linux Cubed Series 7 - Sunsite Vol 1.iso / system / admin / linuxcon.000 / linuxcon / linuxconf-1.6 / xconf / screen.c < prev    next >
C/C++ Source or Header  |  1995-01-08  |  822b  |  36 lines

  1. #include "../misc/misc.h"
  2. #include "xconf.h"
  3. #include "components.h"
  4.  
  5. int xconf_screen (XCONFIG &xcfg)
  6. {
  7.     COMPONENTS comp;
  8.     xconf_readconfall (comp,"screens.xconf","screens.*.xconf");
  9.     char *tbopt2[4001];
  10.     int nbopt = comp.setmenu (tbopt2);
  11.     int ret = 0;
  12.     if (nbopt > 0){
  13.         int choice = 0;
  14.         xconf_menu ("Screens list"
  15.             ,"You must select an screen from this list\n"
  16.              "The list is sorted by manufacturer\n"
  17.              "and product"
  18.             ,tbopt2,choice);
  19.         if (choice != -1){
  20.             COMPONENT *compo = comp.item(choice);
  21.             xcfg.addcomment ("Screen",compo->keyw,compo->arg);
  22.             xcfg.merge (compo->xconfig);
  23.             xconf_notice (compo->notice);
  24.         }
  25.     }else{
  26.         xconf_error (
  27.             "No screens.xconf file could be found\n"
  28.             "either in the current directory or in\n"
  29.             "the directory %s\n"
  30.             ,USR_LIB_XCONF);
  31.         ret = -1;
  32.     }
  33.     return ret;
  34. }
  35.  
  36.